Skip to content

Conversation

@jjonescz
Copy link
Member

Doing this in roslyn (dotnet/roslyn#75465) and didn't want to leave razor behind.

Copy link
Member

@DustinCampbell DustinCampbell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you push this as a draft PR to claim 11,000? 😄

<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="$(_MicrosoftExtensionsPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(_MicrosoftExtensionsPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.FileSystemGlobbing" Version="$(_MicrosoftExtensionsPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.NonCapturingTimer.Sources" Version="5.0.0-preview.4.20205.1" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad to see this go.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this source package would need more warnings to be suppressed with net9 (I'm not yet sure why, but some existing IDE* error codes started newly being reported with net9.0). It seems better to just include the one source file from this source package directly and make it conform to our editorconfig. I also fixed up some missing file headers that got missed because of the IDE0073 being ignored previously.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this is only used in one place in the MS.VS.Razor.LegacyEditor proejct. Could you move this file there?

{
this.designTime = designTime;
BaseCompilation = BaseCompilation.AddReferences(
MetadataReference.CreateFromFile(typeof(TestTagHelperDescriptors).Assembly.Location));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assembly reference started failing due to now being net9.0 but others (via Basic.Reference.Assemblies) being net8.0.

Refactoring of the following file (TestTagHelperDescriptors.cs) is related to this.

<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="$(_MicrosoftExtensionsPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(_MicrosoftExtensionsPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.FileSystemGlobbing" Version="$(_MicrosoftExtensionsPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.NonCapturingTimer.Sources" Version="5.0.0-preview.4.20205.1" />
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this source package would need more warnings to be suppressed with net9 (I'm not yet sure why, but some existing IDE* error codes started newly being reported with net9.0). It seems better to just include the one source file from this source package directly and make it conform to our editorconfig. I also fixed up some missing file headers that got missed because of the IDE0073 being ignored previously.

<Otherwise>
<PropertyGroup>
<DefaultNetCoreTargetFramework>net8.0</DefaultNetCoreTargetFramework>
<DefaultNetCoreTargetFramework>net9.0</DefaultNetCoreTargetFramework>
Copy link
Member Author

@jjonescz jjonescz Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I guess it's not that simple, parts that deploy to VS/VSCode need to stay on net8.0. I will at least extract the independent parts of this PR for now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make it more of a gradual change, you could add net9 to the multi-targeting, and we can continue to change it as the needs of SDK/VS/VSCode change. There are some tradeoffs to making the multi-targeting conditional to being on a CI machine or not.

@jjonescz
Copy link
Member Author

Superseded by #11535.

@jjonescz jjonescz closed this Feb 24, 2025
@jjonescz jjonescz deleted the net9 branch February 24, 2025 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants